import request from '@/common/request/request.js'
import config from '@/common/config/config.js';
const http = config.env

// 商家资产兑换积分
export const augmentPlatformPoints = data => {
	return request({
		url: `${http.baseUrl}/store/augmentPlatformPoints`,
		method: 'POST',
    data
	})
}

//资产支付列表
export const orderAssets = data => {
	return request({
		url: `${http.baseUrl}/customer/assets`,
		method: 'POST',
    data
	})
}

// 获取积分信息 type 1千一 2百二
export const storepoints = type => {
	return request({
		url: `${http.baseUrl}/store/points/exchange/${type}`,
		method: 'GET'
	})
}

// 获取平台积分
export const totalIncome = (data) => {
	return request({
		url: `${http.baseUrl}/customer/totalIncome`,
		method: 'GET',
		data
	})
}

// 获取平台积分明细
export const totalIncomeDetail = (data,type) => {
	return request({
		url: `${http.baseUrl}/customer/walletFlow/${type}`,
		method: 'GET',
		data
	})
}

// 获取商家钱包流水
export const storeWalletFlow = (data, walletType) => {
	return request({
		url: http.baseUrl + '/store/walletFlow/' + walletType,
		method: 'GET',
		data: data
	})
}

// 积分抵扣手续费
export const getExchangeNum = () => {
	return request({
		url: `${http.baseUrl}/appConfig/configKey/exchange.asset.service.charge`,
		method: 'GET'
	})
}
